﻿
@{
    ViewData["Title"] = "ManufacturingExecution";
    Layout = "~/Views/Home/Main.cshtml";
}

<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/layui/2.6.8/css/layui.css"> <!-- 引入layui样式 -->
    <style>
        .form-container {
            border: 2px solid #000; /* 黑色边框，宽度为2px */
            padding: 20px; /* 内边距 */
            margin-left: 100px; /* 整个容器的左边距 */
            width: calc(100% - 220px); /* 宽度为页面宽度的剩余部分，减去左边距和边框宽度 */
            box-sizing: border-box; /* 包含内边距和边框在内计算宽度 */
        }
    </style>

  <style>
   .step-container {
      display: flex;
      align-items: center;
    }
   .step {
      display: flex;
      align-items: center;
      position: relative;
    }
   .step-line {
      height: 2px;
      background-color: black;
      flex-grow: 1;
      margin: 0 10px;
    }
   .step-number {
      margin-left: 5px;
    }
  </style>
</head>


<h4>生产管理/工序任务管理/生产执行</h4>
<br/>
<br/>
<body>
<div class="form-container">
<div class="form-container">
<h5 style="margin-left:120px;">成品信息</h5>
<form class="layui-form" action="">
    <div class="layui-form-item" style="margin-left:120px">

        <div class="layui-inline">
            <label class="layui-form-label">工序名称:</label>
            <div class="layui-input-inline">
                <input type="text" id="ProcessName" name="ProcessName" lay-verify="required" autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-inline">
            <label class="layui-form-label">任务编号:</label>
            <div class="layui-input-inline">
                <input type="text" id="TaskNumber" name="TaskNumber" autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-inline">
            <label class="layui-form-label">工序状态:</label>
            <div class="layui-input-inline">
                <input type="text" id="TaskStatus" name="TaskStatus" autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-inline">
            <label class="layui-form-label">生产批次号:</label>
            <div class="layui-input-inline">
                <input type="text" id="ProductionBatch" name="ProductionBatch" lay-verify="required" autocomplete="off" class="layui-input">
            </div>
        </div>
    </div>

    <div class="layui-form-item" style="margin-left:120px">

        <div class="layui-inline">
            <label class="layui-form-label">规格型号:</label>
            <div class="layui-input-inline">
                <input type="text" id="VendorNo" name="VendorNo" lay-verify="required" autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-inline">
            <label class="layui-form-label">尺寸:</label>
            <div class="layui-input-inline">
                <input type="text" id="VendorName" name="VendorName" lay-verify="required" autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-inline">
            <label class="layui-form-label">单位:</label>
            <div class="layui-input-inline">
                <input type="text" id="VendorContact" name="VendorContact" lay-verify="required" autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-inline">
            <label class="layui-form-label">优先级:</label>
            <div class="layui-input-inline">
                <input type="text" id="Priority" name="Priority" lay-verify="required" autocomplete="off" class="layui-input">
            </div>
        </div>
    </div>
</form>
</div>

<div class="form-container" style="margin-top:20px">
<h5 style="margin-left:120px;">工艺路线</h5>
<form class="layui-form" action="">
    <div class="layui-form-item" style="margin-left:120px">

        <div class="layui-inline">
            <label class="layui-form-label">工艺路线名称:</label>
            <div class="layui-input-inline">
                <input type="text" id="ProcessRouteName" name="ProcessRouteName"  lay-verify="required" autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-inline">
            <label class="layui-form-label">工序编号:</label>
            <div class="layui-input-inline">
                <input type="text" id="ProductionProcessesNumber" name="ProductionProcessesNumber" autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-inline">
            <label class="layui-form-label">当前工序:</label>
            <div class="layui-input-inline">
                <input type="text" id="ProductionProcessesName" name="ProductionProcessesName" autocomplete="off" class="layui-input">
            </div>
        </div>
    </div>

    <div class="layui-form-item" style="margin-left:120px">

        <div class="layui-inline">
            <label class="layui-form-label">工艺路线:</label>
                <div class="step-container">
                  <!-- 步骤将在这里动态生成 -->
                </div>
        </div>
    </div>
</form>
    </div>

<div class="form-container" style="margin-top:20px">
<h5 style="margin-left:120px;">领料信息</h5>
<table class="layui-table" id="MaterialRequisitionInformationTable" width="100%"></table>
</div>

<div class="form-container" style="margin-top:20px">
<h5 style="margin-left:120px;">报工记录</h5>
<table class="layui-table" id="ReportingTable" width="100%"></table>
</div>

<div style="float:right;">
@*     <div class="layui-inline" class="layui-btn-container" id="taskButtons">
        <!-- 初始按钮，这些将被JavaScript替换 -->
        <button type="button" class="layui-btn" id="placeholderButton" style="display:none;"></button>
    </div>     *@
     <button type="reset" class="layui-btn layui-btn-primary" onclick="location.href='/ProcessTasks/ShowProcessTasks'">取消</button>
     <button type="button" class="layui-btn layui-bg-blue" onclick="StartProcess()">开工</button>
     <button type="button" class="layui-btn layui-bg-blue" onclick="Reporting()">报工</button>
     <button type="button" class="layui-btn layui-bg-blue" onclick="StartProcess()">完工</button>
</div>

</div>

<div class="form-container" style="margin-top:20px">
<h5 style="margin-left:120px;">质检记录</h5>
<table class="layui-table" id="QualityInspectionRecordsTable" width="100%"></table>
</div>

<div class="form-container" style="margin-top:20px">
<h5 style="margin-left:120px;">原料调拨</h5>
<table class="layui-table" id="RawMaterialAllocationTable" width="100%"></table>
</div>
</body>
<script src="~/js/ProcessTasks/ManufacturingExecution.js"></script>